package com.sumainfor.zuul.controller;

import com.sumainfor.common.entity.UploadResult;
import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.util.RemoteFileUpload;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;

/**
 * 功能描述:
 * 七牛云上传
 * @Auther: zhlu
 * @Date: 2019/5/17 10:28
 * @Description:
 */
@RestController
@RequestMapping("/file")
public class FileUpload {

    Logger log= LoggerFactory.getLogger(FileUpload.class);

    @Autowired
    private RemoteFileUpload RemoteFileUpload;

    @ResponseBody
    @GetMapping("/Upload")
    public JsonResult Upload(HttpServletRequest request){
        log.info("------------------------------");
        log.info("------------------------request:"+request);
//        return RemoteFileUpload.upload(file);
        return null;
    }

}
